package Modelos;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Observable;
import javax.swing.JTextField;
import logicGame.*;
import logicGame.States.State;

public class ModeloTabuleiro extends Observable {

    Game g;

    public ModeloTabuleiro(Game g) {
        this.g = g;
    }

    public void start(int nP, ArrayList<JTextField> pNames) {
        g.config(nP, pNames);
        setChanged();
        notifyObservers();
    }

    public void bet(int c) {
        g.bet(c);
        setChanged();
        notifyObservers();
    }

    public void chooseAction(int n) {
        g.chooseAction(n);
        setChanged();
        notifyObservers();
    }

    public void chooseArmy(Player p) {
        g.chooseArmy(p);
        setChanged();
        notifyObservers();
    }

    public ArrayList<Player> getPTroops() {
        return g.getPPlace();
    }

    public void PickPlace(int n) {
        g.doAction(n);
        setChanged();
        notifyObservers();
    }

    public Player getActivePlayer() {
        return g.getActivePlayer();

    }

    public int getNumPlayers() {
        return g.getnPlayers();
    }

    public void doAction(int i) {
        g.doAction(i);
    }

    public State getState() {
        return g.getState();
    }

    public HashMap troopToColor() {
        return g.troopToColor();
    }

    public void proxPlayer() {
        g.proxPlayer();
        setChanged();
        notifyObservers();
    }
     public String endGame() {
         return g.endGame();
     }
     
     public StringBuilder scoreToString() {
         return g.scoreToString();
     }
    
}
